fixed shortcomings discovered by stof