Fixed race in clear