Removed possible out of bounds bug.