make sure callback isn't called twice