Fixing js scripts