fixed listener bug
modified test cases