Fixed problem with some environments