Make sure grid.id is an int