This line was the line which was creating the problem of jumping between pages.