Fix invalidate_token method