Fixed a race condition bug which began manifesting itself after upgrade to jQuery 1.10