Re-instate essential line removed in refactoring
Merge branch 'master' into gpu