writer + shutdown fix