fixed non-clearing bug