Fixing for JS errors