fixed pbp sorting issue