fixed stupid mistakes about timing