fix by listening for drain