avoid duplicate callbacks being registered