Fixed error in compute cost function