Why do we need the cast here?