fix bug with extra array element of nil
update test to scan bucket