fix local mode