fix bug in regression test