Wait for elements before trying to use them