title encoding fix, debug flag