Roosmaa's patch for clearing list