potential out of range exception fix