fix issue with shared_ptr in bool context