Fix bugs in npm run client-dev