Why not declaring it as shared instead of casting it to shared below?