fixed bug in lookup where missing = NULL and modes don't match close #5