One of my conditions to skip to specific page is not working