Added breaks condition (Thanks to JayBlanc)