fix bug caused by checkbox