fixed bug in Max-Difference Method

fixed error with deviation