fix warnMessage bug