Fixed issue in RiffWriter