fix out of range value.