debug mode and doc fix