correct encoding problem
add debuge mode