Fix break when join query is not a query