fixed activrecord issue