closes #587