Added test for #29
Modification to make test green
Fixed type check warnings
Merge issue29 into maste (fixes #29)