preventing double callbacks