Fixed jquery promises operators (fixes #2913).