improved ratio/table/bug fix