Fixed a bug when processing the last job page