Fixed undefined Variable for empty listing