Fixing legacy bugs