Fix some bug,decrease the counter