bug fix with counting bytes for frame size