Reduced key size to 2 bytes and added debug