Fixed logic error in Grid
Merge pull request #48 from AntonShevchuk/master

Fixed logic error in grid