Added guard code