Dataset not operating as expected

For anyone else who has this issue, it was a race condition.

It was solved by chaining method calls and making sure no update operations run in the middle of another update operation.