Fix dashboard's main query