Could you post your code so that we could have a look?
The issue is strange, as the first batch seems to work.
If you can’t post code due to some restrictions, could you come up with a small dummy code snippet to reproduce this issue?