Debug fix

Fixes for #178