fix some ui and javascript issues