Added smart detection of installation