Fix for mining formula