fixed empty array call