Fix onReady callback