fix small bugs to user interface and js code, fix bug to calculate two texts