fixed undefined array