fix shared pointer to const object
(issue #10)