added check for bg_ratio bug