Fix uuid error handling

See issue #106.