fix key unwrapping in run.py - class and key type were interchanged