Fixed a bug on checkbox field functionality