Fixing logical flaws