Fix bug with clear