fix #2838, helps with #2597