Attempt to fix a problem with writing errors in some places.