fix bug in experiment code