fixes issues #8159 #8145