fix 3.65, 3.75: improved ajax deferred func