Fixes solution for more precise calculation