fixes #1489, fixes #1490