deviceready bug in PhoneGap