Fix NaN error

Fix two problems from #140. Make sure table header appears again.