Fixed IndexError exception, incorrect index range on arrays
Modified README.md