Fixes a query that would cause the new petapoco changes to have issues since it was asking for the wrong type