Fix issue with empty arrays.

Issue: #10
Reported by: @bapt