Moved remove class to where MASK is removed from the DOM