Fixed out of range exception