fix Writer exit bug