setImmediate was replaced by $.async