fixes #1497 #1451