fixed bug in format table function and map  esc