Fixed the js for server timing calculation