More test, fix bug in rename_klass