Replacing [].flatten with Array.wrap