Added more case to the state listener