Fix test_prepare_minimal