Replace deprecated "new F.Promise()" call