Changes to fix NPEs on bundle switches