Fixed boolean issue for postgres