fix some active record fetching