fix for multiple begin/commit.  hack for IO