Apply patch from @shadowhand on top the last commit.