Fixes JS errors