Fixed a bug that caused last_entry and first_entry to fail to return a result if the latest (or oldest) sheet was deleted