Fixed sorting issue for Posts