Fix to dataset loading deadlock

Fixes #61