Fix end of paper prediction