Clean up some JS errors