Fix onresize

Fix onresize feature