Issue #31: fixed problem with re-factored promises