Removing JavaScript errors