Noting contribution from jofusa since commit history lost.