Fixed bug where global cache failed sometimes

Also added backward compatibility constants