Correct JS in draw page