min
fixed raise exception logic