Fix bug in test_pa