Modified onDeviceReady