Fix last page bug