Added delay to AJAX calls to remove concurrency issues.