potential crash fixed
Setting the size of reslice window