Fixed a very strange bug in to_json after trying the native json gem (had to switch to require ‘json/pure’ to fix it).