Fixing my js errors