Better method of preventing duplicate applications