Improve ack and autoenv