Cast ids to int when not in an array