Corrected ref and unref of mail operations.