fix activerecord adapter