fixes ui bug on resize