use splice rather than length

seems setting the length buggers up the for..in over arrays
this is a temporary bandage because this should be refactored to not use for..in