test the signal and fix some bugs