A better solution to previous bug fixing, grid view initialisation

A better solution to previous bug fixing, grid view initialisation