Fix wait forever when first run