fix using %r instead of %s in error messages