Make error message more specific. Closes #213.