fix the bug in installing packages