Fixing Javascript