Correctly check checkbox value. Fixes #1730.