Fixes php warnings in grid page template