[FIX] when the last_displayed_page is the last page of a survey,showing HTTP Error 500

Showing "the last page" instead of error page 500 if the last_displayed_page in survey.user_input is the last page of the survey