Fix scroll to item code