fixed a bug with the grid when there is no initial value