fix introduced eeror in sqpmethod