fix uninitialized variable warnings in tools