more ref cleanup