fix a performance regression