fix 340 and 347