This closes #333