Fix for error on array with empty positions

This should close #33.