Fixed the case of all-zero curves