fix getLast to display array in correct order