Fixes #504