Fix bug for a new matprem with switchButton