fixes #1784
fixes #1793