fix errors and improve ui