fixing bugs in resize handler hack