Fixed bug where getFields was returning a empty Set when model was
created from existing JavaScript Object