Commented and fixed bug in checking initialization in while loops