Fix for measuring time