fix broken javascript