Fix the bug because of the array (-1).