fixed callback may not be defined