Fixed minor timing bug