Fix return values per Lorenzo Riano proposal except return -1