change casts order for lists and tables