fix the debug mode in encoder module
merge