fix bug with instance to fold allocation in llama conversion (thanks Bernd)