fix resize handler