fix inverted seconds vs milliseconds