Fixing 723 master

fixes #723 

@jancborchardt 

**Needs more testing**