add fix format queries for older pyton versions