Bugfix - checking environment.