Fixed some problems with IDs