fixed issue with active record