entityreference patch to latest dev