Fixes to support new SIM refactoring.