Move logic around slightly - prevent okhierarchy from not being set