JavaScript fix