Fixed exception when loading controller