Fixed bug in environment override functionality