fix javascript controller