Correction of str output for messages
Fix doctests related to str message output