Fixed a bug that screwed up the grid layout

#31