fix activerecord stuff