Fix problems with chap 04 array based solution