Fixed bug in make-dets