Fixed issue with result being passed to resolve.