fix small syntax errors with print to str