fixing SPS/PPS handling