aio support and fix bugs