fixes one half of #2844
#2844 for matser-2.3