fix clear-locals