fix conditional assignment
uncomment listener removal.