Fixes #516