Fixed Index error crashes