callback called twice fix