Fix automodel task when no tables are available