bug fixes for checkbox