Yeah, the code does break if sigma=7 is passed. 

It breaks at the first if statement.