Fixing alert message truncating logic