Fix for truncated error messages on Windows

This fixes #204