Fix crash reading value after empty array

fixes #51