Added guard to callback