Can you check if this cast is really necessary?