fixed nine bug and grid bug