fixed js resize bug