Checking if late_flag is 0 before setting it, because 0 is a falsey value