Corrected problems with nested namespaces

Signed-off-by: Ian bell <ian.h.bell@gmail.com>