Add decoder checka and use some constants.