crash fix & minor tuning