Fixed break from loop