first and last page bug