Fix issue where height of items wasn't calculated correctly