Good day @Dima
The solution was to add a figure 0 to the array if it was empty.
Kind Regards, Raymond