Fixed const correctness in smart pointer.