Fixed as far as writebuffer with single device passing env as instance_var