added code to make "uninstall" work without crash
making "unprepared" the default case and also add "default" mask