fix bug checking the index when it should've checked the stack length
tests that previously failed before the index -> stack length fix
1.5.6