fix the bug -- delete the last page will cause shutdown