should fix #183 - Index out of bounds exception