fixes problem with postgres not accepting ints as booleans