Solving 0 length array issue

Solving #10