fixed problem with a size of array