fix bugs in ByteArrayLinkedHashMap, add tests