Why do we need a cast here?