restoring scrollto logic