Fix on scroll handler