fix where condition