Cast to proper type where it won't infer