Fix bug where source was being treated as an object, when it's a dict