Closes #317