fixes #1591 #1592