Fixed some namespace bugs