fix crashbug with server scanning