Fixes #565