Fix working with multi-environment behaviour