fix to avoid sending empty lists