Fix for missing WITH statement