improve self-tests for reproducibility