Fixed ugly errors.

Fixes #13