Fix javascript mess