fixed js namespacing bug