fixed setState bug