Fix potential bugs

When specifying packages in command line, the install spec in config file
needs also be respected.