Fix for layout messing up when navigating tabs