Fixed part of #2190