Fix where for Memory adapter