Fixes bug in install_key
API should pass the package type