Nasty doubling bug