Trying to fix clear loop