fixed ugly exception when lookup fails