Fixed bug with environment deployment flag