fixed bug in pst and exe checking routines