fix doc types
fix issues found in static analysis