Bug fix from eldenchen: Fixed a crash problem (issue #62)
Fixed issue #102 - stack overflow in doWriteData->maybeDequeueWrite->doWriteData->..