bugfix while writing to mode and waiting for answer