tmp fix a corner case where CloseFrame is not properly decoded