Cloud code prevent status change