Hacky fixes to address the fact that ids are not always Longs and sometimes Strings because they sometimes contain an underscore