Added a check so you can't delete the last page