fixed get_diff(), broken in 8e783468d6ddfe7a0b398872c17f14b7385c9223