Clean up some js errors