Fixed Promise resolution.