bugfix at PS token handling and debug printing