multiple fixes

- fixes #204 
- fixes #206 
- fixes #199 
- fixes #246