Some changes with breaking out of loops