Loop error

Last version doesn't compile with C30