fixed form breaking javascript bug