fixed grid bug