fixes view bug on resize