Remove unwanted modes.