Solved a bug that applies incorrectly the timestamps