Fixed potential issue with timing