Fix bug with next and back in UI, redirect user to the right page after command execution