add %r and %b keyword and fix message bug