cleaning up some js errors