Array reshape bugfix