removed unused variable
make sure wait_read is only used in sync mode