Added handling for case source.kind_of?(Hash)