fix bug init in ActiveRecord