Added missing call to invalidate