Fixed bad time difference calculation.