AMD, Fixes #3, Fixes compatibility with Phonegap