closes #504