Fixed and slightly modified str()