fixed checking of undefined ops