Closes #510