added fix for switchmodel