bugfix clear

removing an element doesn't work without setTimeout 0 in a each function.