fix for version() for when context is not root, #34