Query on types was unsuccessful