Os grid square boundary bug fixes