fix timing issue