fixed very difficult namespace pollution bug