It is caused by push-mark and exchange-point-and-mark in shell-command-on-region. Leo