Fixing js after "magic" update