Fixed EntityCode + Infrastrucutre session issues