fix bug at serializing raw bytes more than 6 byte and less than 32 bytes (fixes #5)