Making the while first so it wont corrupt