fix race condition on youtube api loader