fixed a bug in error messages handling