fix performance.now handling