See the next commit. Seems to be working.