Small improvements in error message handling.