bug fix for checkbox