fixed Resolve method to raise RuntimeError again, such that it can be used as a library