Adding a wait to prevent stale element