Fix the write listener in the framing code