Fix next and prev [fixes #45007309]