fixes #693 and #692