Fix for #131 and #129
Fix for #110