Fixing race condition with contentReadyDelay