fix most of errors