A few fixes to precompute