fixed issue with buffer data not writing to disk