ConvertToFormat: fixed a bug where it was called with invert = true