fixed a problem with grid