@mmisiur Thank you for your reply.
It was not completely expected, so I have changed the decoder structure a little. I have made an edit to the original post. Now the error is stuck at 1. Thanks again.