Fixed bugs in GridView