improved behavior of '-p' option.