Fixed clear bug, optimized resetting map