Ildipo/issue 836

This fixes issue #836