Added checkbox test and fixed up checkbox code