fix bug on scanning beacon