Fixed test declaration
Fixed out-of-bounds exception