Tables and bug fix