Correctly detect installation path