fixed namespace calculation #1100

fixes #1100