Fixing a logical bug