use internal ref for gem and update some of them