Fix frame length issue