Added logic in control-decode.