fix hlint and scan warnings