Still trying to fix while loop