Fixed bugs on table