While loop fixes.