Quick fix needed for #1498, since the `unwrap` on empty arrays will panic.
Quick fix needed for #1498, since the
unwrapon empty arrays will panic.