When called with the -m flag window would always exit with some error, usually status='no match', because of an if-match being the last status-setting command in the script.