added variable cast and failing tests