fix prepare_test