Is this cast necessary?