Fixing broken array