Updated version of pull request #1070

Why isn't this updated version of #1070 pulled yet?