fixed malformed close frames