Bug fix on break statement