better handling of -x option