fixed typos, added debug options for join_table