fixed length 0 bytes bug