Better string formatting, fixes #2