fixed issue with dimensions for local arrays.