Fixed some minor issues with the custom scroll listener.