minor improvements on Dirichlet