Attempt at solving scaling bug