Fixed a bug in model type casting.
Version bump to 0.1.2
Regenerate gemspec for version 0.1.2