MainPage: bug fix: handled exception when no posts in database