Fix for mole calculations