fix seconds vs milliseconds error