The use of $stop here is inconsistent, using $end.