bug fixed in ps.py