fix for postgres not accepting booleans as ints