fixed unique array bug