fixing bug with signature and decrease codes length