Fixing the toMilliseconds method.