setup test directory, fix a bug in vector creation arised during tests