Fix problems detailed in Issue #9

This pull request pertains to mismatched object types.