Small fixes for error and warning message handling.