Some bugfix of posts class