Fix scroll top check