fixed a bug with pa with classes