closes #522