Fixed some namespace and type access errors