corrected some marginal cases