Fixed an issue where the checkbox input may not exist and cause error.