fixing beacon detection