Fix onDeviceReady