Fix two issues where listeners didn't get stopped properly
Fix two issues where listeners didn't get stopped properly

callsign-core/cowboy_hybi00,paulperegud/cowboy,grahamrhay/cowboy,layerhq/cowboy,odo/cowboy,imdeps/cowboy,binarin/cowboy,yangchengjian/cowboy,cad627/cowboy,bobos/ecweb,bsmr-erlang/cowboy,hairyhum/cowboy,276361270/cowboy,kivra/cowboy,cad627/cowboy,rabbitmq/cowboy,pap/cowboy,layerhq/cowboy,dangjun625/cowboy,acrispin/cowboy,turtleDeng/cowboy,nviennot/cowboy,K2InformaticsGmbH/cowboy,CrankWheel/cowboy,sile/cowboy,Reimerei/cowboy,callsign-core/cowboy_hybi00,omusico/cowboy,noname007/cowboy,binarin/cowboy,yangchengjian/cowboy,ninenines/cowboy