Legislators agree to Apollo plan; new conditions in the deal