fix satisfy bugs
fix sign of optval for maximize