Fixing Deferred resolve.