badge ajax fix