Fixed scope to_int and to_names conversion