Fix vikrams branch

This supplants #169. I'm happy with this if @roystgnr is.