YSOD when deleting the last remaining post

Added check to see if there are any more posts.