Fixed issue with replacement
Fixed issue with IDs