merged #1929 in 2.2.1