Added support for multiple error messages