JS checkbox selection bugfix