Improve the way warning messages are handled.