fixed undefined when no checkbox selected