Fix setting wrrong custom mode on file and in config.