Closes #617