state listener bug fixed