Fixing the loop for Lab0B

Signed-off-by: Simarpreet Singh <simar@linux.com>