Update to resolve #13

This should more elegantly resolve issue #13