wrapper: fix a bug that if there is no dependencies, the code generated will throw syntax error