fixed crash

forgot to prevent update corners from exceeding gridsize