Fixes #209, Fixes #168
fix #220