fix silly control flow mistake