dont call invalidate twice