fixed pushing target directory into wrong array