correct resize handler