Improved handling and display of warnings