fixed ps script for good this time.