fixing crash when setting controllers to nil