CustomPress checked Checkboxes in Admin not saving

When in WP Admin and editing a custom post type with custom fields which is a checkbox, the values are not saved into the database properly. When the input is checked, the correct value is being saved then immediately getting saved again with a "-1". You'll see why in the code below.

I am using the CustomPress's rendering of the CustomFields, not WP's rendering of custom fields.

I'm using v1.3.4.1.

In CustomPress/core/content-types.php, method save_custom_fields()

It needs to put the special checkbox handling in an }else{ block, otherwise the update_post_meta( good-value ) runs and also the update_post_meta( "-1" ) incorrectly runs and updates the value to -1.

if ( isset( $params[$prefix . $custom_field['field_id']] ) && in_array( $post_type, $custom_field['object_type'])){
update_post_meta( $post_id, $prefix . $custom_field['field_id'], $params[$prefix . $custom_field['field_id']] );

//for non checked checkbox set value -1
if('checkbox' == $custom_field['field_type']){
if ( isset($params["post_type"]) && in_array( $params["post_type"], $custom_field["object_type"] ) ){
update_post_meta( $post_id, $prefix . $custom_field['field_id'], -1 );
delete_post_meta( $post_id, $prefix . $custom_field['field_id'] );

By the way, why is it saving the representation of "unchecked" as "-1"? "-1" equals true when converted to a boolean. This can be confusing and also goes against how WordPress core checkbox options are stored which is either "0" or "1".