Guard against sparkies with length < 0. Shouldnt happen, but something is up somewhere and this is a hacky fix.