Remove cast workarounds -- upstream API is fixed