This was the reason why I was passing fixedWidth to the bytetoBuffer and createPhoenixArray methods too. Anyway I have made them to work with byteSize.