Removing cast to array