fixed subtraction error