Replaced references to -1 with the NONE constant