Some fixes to grid