Fixes js errors