Fixing string formatting error