Bugfix

Fixed an array-out-of-bounds exception