Fixed a bug that prevented this from working with deferred