Fix issue with entity id swapping, we need to recode this