Closes #316