Hopefully deal correctly with k = 0.