fixed removeAndInvalidate