Fixes #670