Closes #578