fix a bug may in the last page