IDE-926 backport
IDE-1022 backport