listeners rearranged; fix logging bug