Added system state handler