Fix for #11

Thanks for the patch!
Fix for #12

Thanks for the patch!