Fixes grid layout bug.