fixed #1591

like #1592 but more so