Fix refcode on edm