fixed a crash

handle namespace with invalid locations