fix for the case when environment is empty