fixed active record issue