Remove dirty hack. Closes #340.