Fixes #573
Fixes #569