fixed out of range error.