fix issue when environment is empty