fixed issue with state ids being set to strings instead of object ids
[#22]