patch dex to prevent running applications multiple times