fix a number of bugs, mostly with direct ActiveModel (non-ActiveRecord) support