fixes #948

untested