minor fixes for numerics