Error in calculations is fixed