fix minim bugs