Fix everything. Closes #298.