cleanup for phonegap