added state verification on callback