Fixing fractal calculation