The @foreach statement implementation has follows bugs: 1. Traversing @foreach statement duplicates the last iteration value; 2. The first output of @foreach statement produce redundant padding. 