closes #541