Mevanoff/bugs

Fixes for #72 and #63