fixed some PoS bugs