fixed waiting issue