source code format
fixed some bugs resulting from previous merge
adapt to ioctask changes