fixes class cast ex on tables with header / footer