Solved issue with error messages in alert