Grid view: Fix bug in centering calculation