fix the bug with wait user