Allocate sufficiently large storage arrays for endpoints

This fixes an index-out-of-bounds error reported in PR #93.