Fix of sga.py for opaque keys.