Fix bug with external id no longer working