Fixed issue #67. Partial implementation to resolve issue #41.