Fix -1 issue