fixed getWidth and getHeight for scripts phase1