Some fixes

Probably #220 is duplicate of #206