fixed js to resize patience