self.defaults should be object not array

self.defaults was an array rather than an object, this was causing the behavior seen in #51.