trying to fix waiting issue