Fixed unstable calculations