Fix some clearing issues