fixing javascript for sort form dropdown