refactored model editor renderer switch code to stop fatal crash