Fixed bug if no posts in DB