Fixing build_table