Fix bug causing the page to not reflow when switching iamge and list view