fixing time difference problem