Fix escaping of username queries