Moved branch of execution into the correct check