add a case for searching undefined environment