next and back buttons not working