found an annoying bash variable-overwrite bug