minor fixes and tools