Add missing include
Fix handling of logical constraints