Multiple instance support; fix timing bug.