fix for active record bug