Added guard functionality