fixed error in decodeStage