Fix Out-Of-Bounds Error

Thx to Florian Kroll for reporting it!