fix for 0-size arrays