Fixing nasty bugs