Fixed while loop addressing