adding onresize fix