correct TypeError with string formatting