Added #define to determine session replacement behaviour.