added static_cast<bool> to shared_ptr conversions