fixing a bug where if selenium could not retrieve a valid environment the manager would crash