Fixed a bug when converting name-spaces