Prevented to start transaction if flag is false