fix a couple of bugs that showed up when there was exactly 1 post in the db