Try to combine mode changes. Related to issue #1.