fix #515
suggestion for #517