reverse array fix