improve memory out of range check
modify http comment