fix hlint and scan errors