fixing grid error