fix bug introduced by merging prev PR