Minibugfix and minioptimization