fix negative value in calculation