fix qep bug