fixed debug template, preventing errors in model when try to load table-fields and tablename is empty