Changed the order in which the uninstall check happens