Fix inlining to work properly with IO. Fixes issue#4.